VS docs + VS cross-build#537
Conversation
Windows does not have `unzip`, but VS includes CMake 3.18.
|
Agreed the boilerplate could stand to have some stub configs for CMake Tools and a launch.json too. I keep finding myself taking the same steps with each new project. One approach could be encouraging the setting of an environment variable: export PATH_32BLIT="/home/phil/Development/32blit/32blit-betaAnd then have a set of default configs that use it:
[
{
"name": "32blit",
"toolchainFile": "${env:PATH_32BLIT}/32blit.toolchain"
}
]
{
"cmake.configureSettings": {
"32BLIT_PATH": "${env:PATH_32BLIT}"
}
}
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${env:PATH_32BLIT}"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "gcc-x64",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
} |
|
So err, ignoring the fact I was talking about VS and not VS Code... 😄 (slightly different and more complex config, yay) I have a global 32blit toolchain setup and (Though you'd also want |
|
Ugh VS/VS Code will always confuse me. Whyyy! Yeah VS config is... more complicated. I've raised a draft PR against the boilerplate here: 32blit/32blit-boilerplate#9 |
|
Yeah... {
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": [
{
"name": "32BLIT_PATH",
"value": "C:/Users/Charlie/source/repos/32blit-beta",
"type": "PATH"
}
]
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": [
{
"name": "32BLIT_PATH",
"value": "C:/Users/Charlie/source/repos/32blit-beta",
"type": "PATH"
}
]
},
{
"name": "32Blit-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "gcc-arm" ],
"variables": [],
"cmakeToolchain": "C:/Users/Charlie/source/repos/32blit-beta/32blit.toolchain",
"intelliSenseMode": "linux-gcc-arm"
},
{
"name": "32Blit-Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"cmakeToolchain": "C:/Users/Charlie/source/repos/32blit-beta/32blit.toolchain",
"inheritEnvironments": [ "gcc-arm" ],
"variables": [],
"intelliSenseMode": "linux-gcc-arm"
}
]
}Really likes making you repeat yourself. |
|
At least you can set a variable starting with a number, that little wart of environment variables necessitated |
|
CMake weirdness being a good thing... 😄 |
Mentions adding a release config in the setup docs and adds some info about doing a cross-build (I've tested that this at least builds...). Had to patch the toolchain to work around the lack of
unzipthough.(Maybe the boilerplate should have a CMakeSettings.json with a reasonable set of configs and placehholder paths?)